<?php
if($this->session->userdata('admin_type') == 'Web Admin')
{
	$this->admin = 'admin';
}
$this->load->view('admin/head'); 
$this->load->view('admin/header');
?>
<style>
.Err_update{ color:red; }
</style>
<!-- Content -->
<div class="space30"></div>
<div class="container">
	<div class="row">
		<div class="col-md-2">
			<nav class="navbar1">
				<?php $this->load->view('admin/left_nav'); ?>
				
			</nav>
		</div>
<div class="col-md-10">
        <!--form starts-->
        	<div class="form_container">
            		<h4>Update Profile</h4>
                    <!--row starts-->
                    <form action="" method="post" id="updateadminform"/>
		            <div class="success_msg" style="margin-left:15px;">
					<?php echo $this->session->userdata('update_message'); $this->session->unset_userdata('update_message');?>
				</div>
                    <!--row starts-->
                    	<div class="row1">
                    	<div class="form-group col-sm-12">
                        	<label for="fullname2">Full Name </label>
                            <input class="form-control white" id="namefull" name="fullname" type="text" placeholder="Full Name" value="<?php  echo $query[0]->admin_fullname; ?>" onBlur="this.value=jQuery.trim(this.value)">
                            <div class="error" id="err-name"></div>
                            <span class="Err_update"><?php echo form_error('fullname'); ?></span>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <!--row closed-->
                     <!--row starts-->
                    	<div class="row1">
                    	<div class="form-group col-sm-12">
                        	<label for="email2">Email</label>
                            <input class="form-control white" id="email_1" name="email" type="text" readonly placeholder="Email" value="<?php echo $query[0]->admin_email; ?>">
                            <div class="error" id="err-name1"></div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <!--row closed-->
                     <!--row starts-->
                    	<div class="row1">
                    	<div class="form-group col-sm-12">
                        	<label for="password2">Password</label>
                            <input class="form-control white" id="npassword" name="password" type="password" onBlur="this.value=jQuery.trim(this.value)">
                            <div class="error" id="err-name2"></div>
                           
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <!--row closed-->
                     <!--row starts-->
                    	<div class="row1">
                    	<div class="form-group col-sm-12">
                        	<label for="confirm_password2">Confirm Password</label>
                            <input class="form-control white" id="cpassword" name="confirm_password" type="password" onBlur="this.value=jQuery.trim(this.value)">
                            <div class="error" id="err-name3"></div>
                             <span class="Err_update"><?php echo form_error('password'); ?></span>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <!--row closed-->
                     <!--row starts-->
                    	<div class="row1">
                    	<div class="form-group col-sm-12">
                        	<label for="contact_no2">Contact Number</label>
                            <input class="form-control white" id="cno" name="contact_no" type="text" placeholder="Contact Number" value="<?php echo $query[0]->admin_contact_number; ?>" onBlur="this.value=jQuery.trim(this.value)">
                            <div class="error" id="err-name4"></div>
                            <span class="Err_update"><?php echo form_error('contact_no'); ?></span>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <!--row closed-->
                     <!--row starts-->
                    	<div class="row1">
                    	<div class="form-group col-sm-12">
                        	<label for="Affiliation2">Affiliation</label>
                            <textarea class="form-control white" name="affiliation" placeholder="Affiliation" onBlur="this.value=jQuery.trim(this.value)" ><?php echo $query[0]->admin_affiliation;?></textarea>
                            <script type="text/javascript" src="<?php echo ASSET_URL; ?>ckeditor/ckeditor.js?t=B5GJ5GG"></script>
						<script type="text/javascript">//<![CDATA[
							CKEDITOR.replace('affiliation', {"toolbar":"Standard"});
							//]]></script>
						<div class="error" id="err-desc"></div>
                        <span class="Err_update"><?php echo form_error('affiliation'); ?></span>
							
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <!--row closed-->
                    <!--row starts-->
                    	<div class="row1">
                    	<div class="form-group col-sm-12">
                        	<label for="research_area2">Research Area</label>
                            <textarea class="form-control white" name="research" placeholder="Research" onBlur="this.value=jQuery.trim(this.value)" value=""><?php echo $query[0]->admin_research_area;?></textarea>
                            <script type="text/javascript" src="<?php echo ASSET_URL; ?>ckeditor/ckeditor.js?t=B5GJ5GG"></script>
						<script type="text/javascript">//<![CDATA[
							CKEDITOR.replace('research', {"toolbar":"Standard"});
							//]]></script>
						<div class="error" id="err-desc"></div>
                       <span class="Err_update"><?php echo form_error('research'); ?></span>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <!--row closed-->
                    <!--row starts-->
                    	<div class="row1">
                    	<div class="form-group col-sm-12">
                        	<label for="Remark2">Remark</label>
                            <textarea class="form-control white" name="remark" placeholder="Remark" onBlur="this.value=jQuery.trim(this.value)"><?php echo $query[0]->admin_remark; ?></textarea>
                            <script type="text/javascript" src="<?php echo ASSET_URL; ?>ckeditor/ckeditor.js?t=B5GJ5GG"></script>
						<script type="text/javascript">//<![CDATA[
							CKEDITOR.replace('remark', {"toolbar":"Standard"});
							//]]></script>
						<div class="error" id="err-desc"></div>
                        <span class="Err_update"><?php echo form_error('remark'); ?></span>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <!--row closed-->
					 
                </div>
					 <input type="submit" id="update_admin" class="btn btn-primary" value="Save & Continue">
					 
        </form>
        <!--form closed-->
         <div class="space30"></div>
           
      </div>
       <div class="clearfix"></div>
    </div>    
  </div>    
  
  <div class="space20"></div>  
  <div class="space30"></div>  
 
<!-- Content End -->
<?php $this->load->view('common/footer'); ?> 
  